package com.flyxiaozhu.erp.core.entities;

import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;

/**
 * @author flyxiaozhu
 * @date 2019-04-16 23:59
 */
@Entity
@DynamicUpdate
@DynamicInsert
@Data
public class GoodsStockLog extends BaseEntity {
    @Column(columnDefinition = "int(11) NOT NULL DEFAULT 0 COMMENT '操作人ID'")
    private long uid;

    @Column(columnDefinition = "varchar(32) NOT NULL DEFAULT '' COMMENT '操作人姓名'")
    private String realname;

    @Column(columnDefinition = "varchar(32) NOT NULL DEFAULT 0 COMMENT '操作方式（in入库，out出库，del删除SKU）'")
    private String type;

    @Column(columnDefinition = "int(11) NOT NULL DEFAULT 0 COMMENT '商品ID'")
    private long goodsId;

    @Column(columnDefinition = "text COMMENT '操作前库存信息'")
    private String oldData;

    @Column(columnDefinition = "text COMMENT '变更信息'")
    private String changeData;

    @Column(columnDefinition = "varchar(255) NOT NULL DEFAULT '' COMMENT '备注'")
    private String remark;
}
